﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Home.Master" Inherits="System.Web.Mvc.ViewPage<MailBroadcastCore.Models.Collection.CreateCampaignCollection>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EditCampaign
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <style type="text/css">
    .hidden {
    display: none;
    }
    </style>
    <link rel="stylesheet" type="text/css" href="../../Content/jquery-ui.css" />
    <script type="text/javascript" src="/Scripts/jquery.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".tabmenu").removeClass("hidden");
            $(".tabs h2").addClass("hidden");
            $(".tabs").tabs();
        });
    </script>
    <% Html.EnableClientValidation(); %> 
    
    <% using (Html.BeginForm("SaveEditCampaign", "Campaign", FormMethod.Post, new { id = "multipart/form-data", enctype = "multipart/form-data" }))
            {%>
            <div>   
                <center><h2>Edit Campaign</h2></center>         
                <div class="tabs">
                    <ul class="tabmenu hidden">
                    <li><a href="#tab-1">Detail</a></li>
                    <li><a href="#tab-2">Email Setting</a></li>
                    <li><a href="#tab-3">Attach File</a></li>
                    <li><a href="#tab-4">Template</a></li>
                    <li><a href="#tab-5">Customer List</a></li>
                    <li><a href="#tab-6">Schedule</a></li>
                    </ul>
                <div id="tab-1">
                <h2>Detail</h2>
                <p><%=Html.Action("CampaignDetailsEdit")%></p>
                </div>
                <div id="tab-2">
                <h2>Mail Setting</h2>
                <p><%=Html.Action("CampaignMailSettingEdit")%></p>
                </div>
                <div id="tab-3">
                <h2>Attach File</h2>
                <p><%=Html.Action("CampaignAttachFileEdit")%></p>
                </div>
                <div id="tab-4">
                <h2>Template</h2>
                <p><%=Html.Action("CampaignTemplateEdit")%></p>
                </div>
                <div id="tab-5">
                <h2>Customer List</h2>
                <p><%=Html.Action("CampaignCustomerListEdit")%></p>
                </div>
                <div id="tab-6">
                <h2>Schedule</h2>
                <p><%=Html.Action("CampaignScheduleEdit")%></p>
                </div>
                </div>
                <%=Html.Hidden("CampaignID__CampaignDetail", ViewData["CampaignID"])%>
            </div>
            <div>
                 <div id="divError">
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.ClientID_CampaignDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.ArrayStaffClientID)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.Name_CampaignDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.UserName_MailSettingDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.Password_MailSettingDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.SMTPPort_MailSettingDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.Content_TemplateDetailValueINOUT)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.ScheduleName_ScheduleDetail)%></span>
                    </p>
                    <p>
                        <span style="color:Red;font-weight:bold"><%=ViewData["Result"]%></span>
                    </p>                 
                 </div>
                 <input id="btnSave" type="submit" value="Save Campaign" class="button themed" />
            </div>
    <% } %>

</asp:Content>
